package com.medvalley.tcm.service.impl;

import com.medvalley.tcm.dao.WhiteSNDao;
import com.medvalley.tcm.domain.WhiteSN;
import com.medvalley.tcm.service.WhiteSNService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author linsong
 * @date 2019/3/29 17:10
 **/

@Service
public class WhiteSNServiceImpl implements WhiteSNService {

    @Autowired
    private WhiteSNDao whiteSNDao;

    @Override
    public WhiteSN findOne(String sn) {
        return whiteSNDao.findOneBySn(sn);
    }

    @Override
    public WhiteSN saveOne(String sn) {
        WhiteSN whiteSN = new WhiteSN();
        whiteSN.setSn(sn);
        whiteSNDao.save(whiteSN);
        return whiteSN;
    }


}
